< previous page page_348 next page >

Page 348
Variable ReferenceToVariable is a pointer to myVariable.
The only place where references are regularly used is with certain types of structures in the OLE subsystem. When you see a reference data type, just treat it as if it were a pointer, and you'll do fine.
Classes and Structures
These terms are used to define user-defined types in the C language. You'll find out a lot more about how to handle classes and structures as you proceed through this book. From a Visual Basic programmer's perspective, there is no difference between a class and a structure. They are defined as follows:
class myClass {
        Define variables within the structure here
        };
Derived Data Types
So far you've seen that the C language actually specifies the following keywords for data types: char, short, int, long, float, and double, as well as the following modifiers:
unsigned: Indicates the data is unsigned. There is also a signed keyword, but it is rarely used because the default is signed.
[ ]: Indicate an array of a fundamental data type.
*: Indicates a pointer to a data type.
&: Indicates the address of a variable or a reference to a variable.
Despite the shortness of this list, any API or DLL documentation you see will have dozens of additional data types. Where do they come from?
The answer lies in the fact that the C language allows you to derive new data types from existing data types. This is done using a statement called "typedef." For example, consider the statement:
typedef unsigned char BYTE;

 
< previous page page_348 next page >